﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace PropertyBagDemo
{
    enum SettingsEnum
    {
        Setting1,
        Setting2,
        Setting3,
        Setting4
    }

    class SubSetting
    {
        private SettingsEnum _a;
        public SettingsEnum A
        {
            get { return this._a; }
            set { this._a = value; }
        }

        private SettingsEnum _b;
        public SettingsEnum B
        {
            get { return this._b; }
            set { this._b = value; }
        }

        private SettingsEnum _c;
        public SettingsEnum C
        {
            get { return this._c; }
            set { this._c = value; }
        }
    }

    class IncrementSettings
    {
        private SubSetting _subSetting = new SubSetting();
        [TypeConverter(typeof(ExpandableObjectConverter))]
        public SubSetting SubSetting
        {
            get { return this._subSetting; }
            set { this._subSetting = value; }
        }

			

        private string[] _arrayTest = {"1", "2", "3"};
        public string[] ArrayTest
        {
            get { return this._arrayTest; }
            set { this._arrayTest = value; }
        }

        private bool _autoUpdateFileVersion;
        /// <summary>
        /// Gets or sets a value indicating whether to auto update the file version.
        /// </summary>
        /// <value>
        /// 	<c>true</c> to auto update the file version; otherwise, <c>false</c>.
        /// </value>
        [Category("Auto Update")]
        [Description("Auto update the file version. Note that setting this to true on solution level will have no effect on building individual projects.")]
        [DisplayName("Update AssemblyFileVersion")]
        [DefaultValue(false)]
        public bool AutoUpdateFileVersion
        {
            get { return _autoUpdateFileVersion; }
            set { _autoUpdateFileVersion = value; }
        }

        private bool _autoUpdateAssemblyVersion;
        /// <summary>
        /// Gets or sets a value indicating whether to auto update the assembly version.
        /// </summary>
        /// <value>
        /// 	<c>true</c> to auto update the assembly version; otherwise, <c>false</c>.
        /// </value>
        [Category("Auto Update")]
        [Description("Auto update the assembly version. Note that setting this to true on solution level will have no effect on building individual projects.")]
        [DisplayName("Update AssemblyVersion")]
        [DefaultValue(false)]
        public bool AutoUpdateAssemblyVersion
        {
            get { return _autoUpdateAssemblyVersion; }
            set { _autoUpdateAssemblyVersion = value; }
        }

        private DateTime _projectStartDate = new DateTime(1975, 10, 21);
        /// <summary>
        /// Gets or sets the start date.
        /// </summary>
        /// <value>The start date.</value>
        [Category("Auto Update")]
        [Description("The start date to use.")]
        [DisplayName("Start Date")]
        [DefaultValue(typeof(DateTime), "1975/10/21")]
        public DateTime StartDate
        {
            get { return _projectStartDate; }
            set { _projectStartDate = value; }
        }

        private bool _isUniversalTime;
        /// <summary>
        /// Gets or sets a value indicating whether this instance is using UTC.
        /// </summary>
        /// <value><c>true</c> if this instance is using UTC; otherwise, <c>false</c>.</value>
        [Category("Auto Update")]
        [Description("Indicates wheter to use Coordinated Universal Time (UTC) time stamps.")]
        [DisplayName("Use Coordinated Universal Time")]
        [DefaultValue(false)]
        public bool IsUniversalTime
        {
            get { return this._isUniversalTime; }
            set { this._isUniversalTime = value; }
        }

        private bool _replaceNonNumerics = true;
        /// <summary>
        /// Gets or sets if non-numbers within the version should be replaced by a zero.
        /// </summary>
        /// <value>The new value. :)</value>
        [Category("Auto Update")]
        [Description("If non-numeric values within the version should be replaced with a zero.")]
        [DisplayName("Replace Non-Numerics")]
        [DefaultValue(true)]
        public bool ReplaceNonNumerics
        {
            get { return _replaceNonNumerics; }
            set { _replaceNonNumerics = value; }
        }
    }
}
